<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<style>

    /*
        如果盒子本身没有width/height属性，则此时padding不会撑开盒子大小

    */
    div {
        width: 300px;
        height: 300px;
        background-color: pink;

        /* padding: 10px; */

        padding-top: 10px;
        padding-left: 10px;
        padding-bottom: 10px;
        padding-right: 10px;

    }
</style>

<body>
    <div>盒子模型</div>
</body>

</html>